There are three steps required to handle a definition:
scrap
to...@>
@
@d Build macro definition
@
Name *name = collect_macro_name();
int scrap = collect_scrap();
@<Add scrap
to...@>
@
Since a file or macro may be defined by many scraps, we maintain them
in a simple linked list. The list is actually built in reverse order,
with each new definition being added to the head of the list.
@d Add scrap
to name
's definition list
@
Scrap_Node *def = (Scrap_Node *) arena_getmem(sizeof(Scrap_Node));
def->scrap = scrap;
def->next = name->defs;
name->defs = def;
@